package com.zhaoyan.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author zhaoyan
 *
 *	2020年3月2日
 */
public class Goods implements Serializable{
	
	//ID，商品名称，商品价格，已售百分比
	
	private static final long serialVersionUID = -6906538330868753841L;
	private Integer id;
	private String name;
	private BigDecimal price;
	private String selPer;
	@Override
	public String toString() {
		return "Goods [id=" + id + ", name=" + name + ", price=" + price + ", selPer=" + selPer + "]";
	}
	public Goods(Integer id, String name, BigDecimal price, String selPer) {
		super();
		this.id = id;
		this.name = name;
		this.price = price;
		this.selPer = selPer;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public BigDecimal getPrice() {
		return price;
	}
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
	public String getSelPer() {
		return selPer;
	}
	public void setSelPer(String selPer) {
		this.selPer = selPer;
	}
	public Goods() {
		super();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((price == null) ? 0 : price.hashCode());
		result = prime * result + ((selPer == null) ? 0 : selPer.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Goods other = (Goods) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (price == null) {
			if (other.price != null)
				return false;
		} else if (!price.equals(other.price))
			return false;
		if (selPer == null) {
			if (other.selPer != null)
				return false;
		} else if (!selPer.equals(other.selPer))
			return false;
		return true;
	}

	
	
	
}
